import Service from '../../core/baseService';

export default class AttrService extends Service {
  constructor(ctx) {
    super(ctx);
    this.model = ctx.sassmodel.Market;
  }

  async detail(id: string) {
    const result = await this.model.findOne({
      where: { id },
      include: [
        { model: this.ctx.model.Goods, attributes: ['id', 'name', 'main_pic'] }
      ]
    });
    return result;
  }
}
